package com.thwj.project.biz.domain;

    import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thwj.common.annotation.Excel;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

;

/**
 * 消息中心对象 biz_user_message
 *
 * @author generate
 * @date 2023-08-15
 */

@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("biz_user_message")
public class UserMessage extends Model<UserMessage>{
private static final long serialVersionUID=1L;

    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    private Long id;


    private String messageUnique;

    /** 用户id */
            @Excel(name = "用户id")
    private Long userId;

    /** 消息类型（1：系统消息 2：动态消息 3：滴滴消息） */
            @Excel(name = "消息类型", readConverterExp = "消息具体细分类")
    private Integer messageType;

    @Excel(name = "消息归属类型", readConverterExp = "1=：系统消息,2=：动态消息,3=：滴滴消息")
    private Integer messageBelongType;

    /** 消息标题 */
    private String messageTitle;

    /** 消息类容 */
            @Excel(name = "消息类容")
    private String messageContent;

    /** 动态id */
            @Excel(name = "动态id")
    private Long objectId;

    /** 动态抽取图片 */
            @Excel(name = "动态抽取图片")
    private String objectPic;

    /** 动态抽取内容 */
            @Excel(name = "动态抽取内容")
    private String objectContent;

    /***
     * 发送者用户id
     */
    private Long sendUserId;

    /** 是否已读 */
            @Excel(name = "是否已读")
    private Boolean hasRead;

    /** 已读时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "已读时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date readDate;

    /** 创建时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;




    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
